package com.scau.fegin;


import com.scau.entity.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(value = "order")
public interface OrderFegin {
    //支付下单
    @PostMapping(value = "/order/save",produces = "application/json;charset=UTF-8;")
    public void save(@RequestBody PayForm payForm);

    @GetMapping("/order/port")
    public String port();

    @GetMapping(value = "/order/findAll/{page}/{limit}")
    public OrderVO findAll(@PathVariable("page") int page, @PathVariable("limit") int limit);

    @PutMapping(value = "/order/updateState/{orderId}/{state}")
    public void updateState(@PathVariable("orderId") int orderId, @PathVariable("state") int state);

    @GetMapping(value = "/order/findByUId/{index}/{limit}/{uid}")
    public OrderVO findByUId(@PathVariable("index") int index, @PathVariable("limit") int limit,@PathVariable("uid") int uid);

    @GetMapping(value = "/order/orderdetail//findByOrderId/{index}/{limit}/{orderId}")
    public OrderDetailVO findAllByOrderId(@PathVariable("index") int index, @PathVariable("limit") int limit, @PathVariable("orderId") int orderId);
}
